package com.foreknow.test_Interface.demo04;

public class Adventure {
    public static void main(String[] args) {
        Hero hb = new Hero();
        hb.Hero("tom");
        hb.swim();
        hb.fly();
        hb.fight("hello");
        CanFly cf = new Hero();
        cf=hb;
        cf.fly();
        CanSwim cs = new Hero();
        cs=hb;
        ActionCharacter ac =new Hero();
        ac=hb;
        ac.speak("hello");
        ac.fight("hello");
    }
}
